import { getSendLogDetail } from '../../../../api/sms'
import { ref } from "vue";
import { SendLogDetail } from "../types";

// 获取详情加载
const getSendLogDetailLoading = ref(false)

// 发送短信详情
const sendLogDetail = ref<null | SendLogDetail>(null)

// 获取详情方法
const getSendLogDetailFn = async (id: string | number) => {
    getSendLogDetailLoading.value = true
    const res = await getSendLogDetail(id)
    getSendLogDetailLoading.value = false
    sendLogDetail.value = res.data.data.row
}

export default {
    sendLogDetail,
    getSendLogDetailLoading,
    getSendLogDetailFn
}